import request from "@/axios/request";
import url from "@/axios/url";
const { mesUrl, adminUrl } = url();
export const exportUrl = `${mesUrl}mesProductProcessStepDetail/export`;
export const importUrl = `${mesUrl}mesProductProcessStepDetail/import`;
export function getStepSeries (params = {}) {
  return request({
    url: `${mesUrl}mesProductProcessStep/getStepSeries`,
    method: "get",
    params,
  });
}

// 弹框获取系列
export function selectlist (params = {}) {
  return request({
    url: `${adminUrl}baseSeries/selectlist`,
    method: "get",
    params,
  });
}
// 弹框获取型号
export function baseGoods (params = {}) {
  return request({
    url: `${adminUrl}baseGoods`,
    method: "get",
    params,
  });
}
export function getmesProcessMaterial (params = {}) {
  return request({
    url: `${mesUrl}mesProcessMaterial`,
    method: "get",
    params,
  });
}
// 弹框获取工艺
export function getTechnologyList (params = {}) {
  return request({
    url: `${mesUrl}mesProductProcessStep/getTechnologyList`,
    method: "get",
    params,
  });
}
// 弹框获取工序
export function getProcessList (params = {}) {
  return request({
    url: `${mesUrl}mesProductProcessStep/getProcessList`,
    method: "get",
    params,
  });
}
// 产品工艺步骤-分级加载-获取产品/工艺
export function getStepTechnology (params = {}) {
  return request({
    url: `${mesUrl}mesProductProcessStep/getStepTechnology`,
    method: "get",
    params,
  });
}
// 产品工艺步骤-分级加载-获取产品/工艺
export function getStepProcess (params = {}) {
  return request({
    url: `${mesUrl}mesProductProcessStep/getStepProcess`,
    method: "get",
    params,
  });
}
// // 新增节点
export function createNode (data = {}) {
  return request({
    url: `${mesUrl}mesProductProcessStep/create`,
    method: "post",
    data,
  });
}
// // 复制节点
export function copyNode (data = {}) {
  return request({
    url: `${mesUrl}mesProductProcessStep/copy`,
    method: "post",
    data,
  });
}
// // 删除节点
export function deleteNode (data = {}) {
  return request({
    url: `${mesUrl}mesProductProcessStep/delete`,
    method: "post",
    data,
  });
}
// // 工步表格数据
export function getTableData (data = {}) {
  return request({
    url: `${mesUrl}mesProductProcessStepDetail/selectList`,
    method: "post",
    data,
  });
}
// 获取单位型号
export function baseUnitConversion (params = {}) {
  return request({
    url: `${adminUrl}baseUnitConversion/list`,
    method: "get",
    params,
  });
}
// 获取正则配置
export function mesRegularConfiguration (params = {}) {
  return request({
    url: `${adminUrl}commonRegularConfiguration`,
    method: "get",
    params,
  });
}
// 保存表格
export function saveTable (data = {}) {
  return request({
    url: `${mesUrl}mesProductProcessStepDetail/save`,
    method: "post",
    data,
  });
}
// 预览,重新排序
export function sort (data = {}) {
  return request({
    url: `${mesUrl}mesProductProcessStepDetail/sort`,
    method: "post",
    data,
  });
}